#!/usr/bin/env node

const stdin=process.stdin,
      stdout=process.stdout,
      msg=['name','email','QQ','mobile'];

let me={},i=0;

stdout.write(msg[i] + ': ');

stdin.on('data', (data) => {
    me[msg[i++]] = data.slice(0, data.length - 1).toString('utf8');
    if(i === 4) { 
      console.log(me);
      process.exit();      
    }
      stdout.write(msg[i] + ': ');
});

stdin.on('end',()=>{
   console.log('bye');
});


